<?php

/**
 * 公共继承类用于处理集合事件
 */

namespace app\index\controller;

use think\Controller;


//加载redis驱动
use redis\redis;

class CommonController extends Controller {

    public $redis;

    function __construct() {
        parent::__construct();
        session_start();
        //实例话redis
        $this->redis = new redis();
    }

    //用户基本信息
    function user_info($user_token) {
        $user = $this->redis->redis_get($user_token);
        $user_info = json_decode($user, TRUE);
        return $user_info['user_info'];
    }

}
